/**
 * Watermark 组件的主题配置
 * 注意：Watermark 组件不使用 CSS-in-JS 样式系统，而是基于 Canvas 实现
 * 因此这里直接使用 WatermarkProps 作为主题配置类型
 */

import type { WatermarkProps } from 'antd/es/watermark';

export const watermarkThemeConfig: Partial<WatermarkProps> = {
  zIndex: 9,
  rotate: -22,
  font: {
    color: 'rgba(0, 0, 0, 0.15)',
    fontSize: 16,
    fontWeight: 'normal',
    fontStyle: 'normal',
    fontFamily: 'sans-serif',
  },
  gap: [100, 100],
};

export const getWatermarkTheme = (
  customConfig?: Partial<WatermarkProps>
): Partial<WatermarkProps> => {
  return {
    ...watermarkThemeConfig,
    ...customConfig,
    font: {
      ...watermarkThemeConfig.font,
      ...customConfig?.font,
    },
  };
};

export type { WatermarkProps } from 'antd/es/watermark';

